package mask;

import java.util.Scanner;

public class Flag {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		boolean flag = false;
		for (int i = 2; i < num; i++) {
			if (num % i == 0) {
				flag = true;
			}
		}
		if (!flag) {
			System.out.println(num + "是质数");
		} else {

			System.out.println(num + "是合数");
		}

	}
}
